<?php
namespace app\admin\controller;
use think\Db;
use think\Request;
use think\Session;
use think\Cache;
use think\Controller;
use think\captcha\Captcha;
define('FTP_HOST','122.228.236.111');
define('FTP_PORT',21);
define('FTP_USER','jieshuodiapi_com');
define('FTP_PASS','WRHRGAkxFzTa843T');
define('TOKEN','6b57e0685dd8ca3a19e848963251a98a');
define('REDIS_PASSWORD','jieshuodi9541');
define('REDIS_PORT','9541');
define('WEB_TOKEN','4b36adc7ff355357');
define('VIDEO_PATH','http://jieshuodiapi.com');
define('DS', DIRECTORY_SEPARATOR);
defined('ROOT_PATH') or define('ROOT_PATH', dirname($_SERVER['SCRIPT_FILENAME']) . DS);
define('PAGENUM',10);
class Common extends  Controller
{
	public function __construct(Request $request)
	{
		ini_set("session.cookie_httponly", 1);
		header('X-Frame-Options: deny');

		$url_arr=explode('/',$request->pathinfo());
		$url_arr=array_filter($url_arr);
		//$url_arr=$request->dispatch()['module'];
		/*if(!empty($url_arr[1]) && $request->path()!='admin/index/verify'){
			$index=new \app\admin\model\Index();
			$status=$index->check_token();
			if($status!=1){
				$this->redirect('/404.html');
			}
			else{
				$status=$index->check_menu();
				if($status!=1){
					$result['code']=1;
					$result['msg']='暂无权限';
					echo json_encode($result);exit();
				}
			}
		}*/
		parent::__construct();
		//parent::__construct($request);
	}
}
